import cx_Oracle

con = cx_Oracle.connect('MY_DB/1234@127.0.0.1')
print con.version
con.close()
